<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/mhui.css" />
    <style>
        /* 隐藏滚动条 */
    ::-webkit-scrollbar {
        display: none;
    }
        html,body {
            background: transparent;
            height: 100%;
        }
       
[v-cloak] {
    display: none;
}
.tiezhi{background: rgb(0, 0, 0,0.8);padding-bottom: 30px; padding-top: 20px;  width: 100%;position: fixed;bottom: 20%;z-index: 9999;display: flex;flex-wrap:wrap}
.tiezhilist{display: flex;flex-wrap:wrap;width: 100%;max-height: 150px;overflow-y: auto;}
    </style>
    <!-- <script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>
	<script>
	        var vConsole = new VConsole()
	</script> -->
</head>

<body >
   <div id="page" class="page" v-cloak>
    <!-- 上部点击控制层 -->
    <div style="flex: 1; " v-on:click="sendToBack" ></div>
    <!-- 下部功能界面 -->
    <div class="mh-range-top" v-if="(childName == '美颜'||childName == '美型') && childChildName[childName] != undefined && childChildName[childName] != '原图'">
        <div class="mh-range-text">{{childChildName[childName]}}</div>
        <input type="range" class="mh-range" v-model="functionList[childName][childChildName[childName]].value" v-on:input="change" :min="functionList[childName][childChildName[childName]].minValue" :max="functionList[childName][childChildName[childName]].maxValue" />
        <div class="mh-range-text">{{functionList[childName][childChildName[childName]].value}}</div>
    </div>
    
    <!-- 美颜控制主界面 -->
    <div v-show="name == undefined" ref="main"  class="main" style="position: relative; bottom: 20%;">
        
        <template v-if="item.name != '美妆'" v-for="(item,index) in items">
            
                <div @click="select(index)" class="main-item">
                <img class="main-item-img" :src="mainList[item.name].image" />
                <span class="main-item-text">{{item.name}}</span>
                </div>
                
        </template>
       
    </div>

    
<!-- 贴纸 -->
    <div  v-show="name == '贴纸'" ref="beauty"  class="tiezhi">
        <div style="display: flex;padding: 10px 0px;width: 100%;">
            <div  @click="selectChild(index)" v-bind:class="[functionList[item.name].isSelect==true? 'tab-text-select':'tab-text']" v-if="item.name != '一键美颜'" v-for="(item, index) in itemChild" class="tab-item">
                {{item.name}}
            </div>
        </div>
         <div class="line" style="width: 100%;"></div>
        <div class="tiezhilist">
            
        <template v-if="childName == '基础贴纸'||childName == '高级贴纸'||childName == '基础面具'||childName == '高级面具'"  v-for="(item,index) in functionList[childName]">
                
            <div @click="selectTieZhi(item);selectChildChild(index)" class="beauty-item flex-2" >
            <img class="" style="width:80%;" :src="item.thumb" />  
            <div v-if="item.isSelect == true" class="beauty-item-select-wrap"> </div> 
            </div>
            
        </template>
    </div> 
    </div>
    


<!-- 美颜、特效、哈哈镜-->
<div  v-show="name == '美颜'||name == '特效'||name == '哈哈镜'" ref="beauty"  class="main beauty-contr">
    <div class="tab">
        <div @click="selectChild(index)" v-bind:class="[functionList[item.name].isSelect==true? 'tab-text-select':'tab-text']" v-if="item.name != '一键美颜'&&item.name != '动作'" v-for="(item, index) in itemChild" class="tab-item">
            {{item.name}}
        </div>
    </div>
    <div class="line"></div>
    <div class="beauty-items">
    <!--  美颜-->
    <template v-if="childName == '美颜'||childName == '美型'"  v-for="(item,index) in itemChildChild">
       
       <div @click="functionList[childName][item.name].onclick(index);selectChildChild(index)" class="beauty-item beauty-item-low flex-0" >
       <img class="beauty-item-low-img" v-if="functionList[childName][item.name].isSelect != true" :src="functionList[childName][item.name].image[0]" />
       <img class="beauty-item-low-img" v-else :src="functionList[childName][item.name].image[1]" />

       <span class="beauty-item-text" v-bind:class="functionList[childName][item.name].isSelect == true?'beauty-item-text-select':'beauty-item-mid-text'">{{item.name}}</span>
       
           </div>
       
    </template>

      <!--  水印-->
      <template v-if="childName == '水印'"  v-for="(item,index) in functionList[childName]">
        
        <div @click="item.onclick(item.name);selectChildChild(index)" class="beauty-item beauty-item-mid flex-1" v-bind:class="item.isSelect == true?'beauty-item-select':''">
        <img class="beauty-item-mid-img-water"  :src="item.image" />            
            </div>
        
    </template>
     

        <!-- 特效 滤镜 -->
    <template v-if="childName == '特效'||childName == '滤镜'"  v-for="(item,index) in itemChildChild">
                
        <div v-if="functionList[childName][item.name]!=undefined" @click="functionList[childName][item.name].onclick(item);selectChildChild(index)" class="beauty-item">
        <img class="beauty-item-height-img" :src="functionList[childName][item.name].image" />
        <span class="beauty-item-text beauty-item-height-text">{{item.name}}</span>
        <div v-if="functionList[childName][item.name].isSelect == true" class="beauty-item-height-select">
                <img class="beauty-item-height-select-img" src="../image/yes_btn.png"/>
                <span class="beauty-item-height-select-text">{{item.name}}</span>
        </div>
        </div>
    </template>
      
        <!--  哈哈镜-->
    <template v-if="childName == '哈哈镜'"  v-for="(item,index) in itemChildChild">
            
            <div @click="functionList[childName][item.name].onclick(item.name);selectChildChild(index)" class="beauty-item beauty-item-mid" v-bind:class="functionList[childName][item.name].isSelect == true?'beauty-item-select':''">
            <img class="beauty-item-mid-img" v-if="functionList[childName][item.name]!=undefined" :src="functionList[childName][item.name].image" />
            <span class="beauty-item-text" v-bind:class="functionList[childName][item.name].isSelect == true?'beauty-item-text-select':'beauty-item-mid-text'">{{item.name}}</span>
            
                </div>
            
    </template>
    
</div>

</div>

   
</div>

</div>

</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/mhsdk.js"></script>

<script type="text/javascript">
    // import mhsdkApi from '../script/mhsdk.js';

    window.apiready = function(){
        console.log("--apiready->mhui");
        var mhItems = api.pageParam.items;
        vm.items = mhItems;
        vm.$mount("#page");
        console.log("-->items->",mhItems);
        api.addEventListener({
            name: 'keyback',
            extra:{
                slidBackIntercept:false    //打开页面时若 slidBackType 参数为 edge，可通过此参数设置是否拦截页面右滑返回，只 iOS 有效，默认值为 false，布尔类型
                }
            }, function(ret, err) {
                vm.saveValue();
                api.closeFrame({
			    from: api.frameName,
			    });
        });
    }

    var vm = new Vue({
        data:{
            lastSelectIndex: {},
            lastSelectChildIndex: {},
            name:undefined,
            items:[],
            childName:undefined,
            childChildName:{},
            itemChild:[],
            itemChildChild:[],
            
            mainList:{
                "贴纸":{
                    image:"../image/photograph_btn_tags.png",
                },
                "美颜":{
                    image:"../image/photograph_btn_beauty.png"
                },
                "美妆":{
                    image:"../image/ic_mh_makeup.png"
                },
                "特效":{
                    image:"../image/photograph_btn_special.png"
                },
                "哈哈镜":{
                    image:"../image/ic_mh_haha.png"
                },
               
            },
            functionList:{
                '美颜':{
                    "原图":{
                        image:["../image/beauty_drawing_default.png","../image/beauty_drawing_sele.png"],
                        minValue:0,
                        maxValue:9,
                        value:0,
                        onclick(e){
                            mhsdkApi.setBeautyOrigin()
                        },
                        change(e){
                            mhsdkApi.setBeautyOrigin()
                        }
                    },
                    "美白":{
                        image:["../image/beauty_white_default.png","../image/beauty_white_sele.png"],
                        minValue:0,
                        maxValue:9,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setSkinWhiting(this.value)
                        },
                        isSelect:false
                    },
                    "磨皮":{
                        image:["../image/beauty_buffing_default.png","../image/beauty_buffing_sele.png"],
                        minValue:0,
                        maxValue:9,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setSkinSmooth(this.value)
                        },
                        isSelect:false
                    },
                    "红润":{
                        image:["../image/beauty_ruddy_default.png","../image/beauty_ruddy_sele.png"],
                        minValue:0,
                        maxValue:9,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setSkinTenderness(this.value)
                        },
                        isSelect:false
                    },
                    "亮度":{
                        image:["../image/beauty_light_default.png","../image/beauty_light_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setBrightness(this.value)
                        },
                        isSelect:false
                    },
                    
                },
                '美型':{
                    "原图":{
                        image:["../image/beauty_drawing_default.png","../image/beauty_drawing_sele.png"],
                        minValue:0,
                        maxValue:9,
                        value:0,
                        onclick(e){
                            mhsdkApi.setShapeOrigin();
                        },
                        change(e){
                            mhsdkApi.setShapeOrigin();
                        }
                    },
                   
                    "大眼":{
                        image:["../image/beauty_btn_eye_default.png","../image/beauty_btn_eye_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setBigEye(this.value)
                        },
                        isSelect:false
                    },
                    "瘦脸":{
                        image:["../image/beauty_btn_face_default.png","../image/beauty_btn_face_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setFaceLift(this.value)
                        },
                        isSelect:false
                    },
                    "嘴型":{
                        image:["../image/beauty_btn_mouth_default.png","../image/beauty_btn_mouth_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setMouseLift()
                        }
                    },
                    "瘦鼻":{
                        image:["../image/beauty_btn_thinnose_default.png","../image/beauty_btn_thinnose_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setNoseLift(this.value)
                        },
                        isSelect:false
                    },
                    "下巴":{
                        image:["../image/beauty_btn_chin_default.png","../image/beauty_btn_chin_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setChinLift(this.value)
                        },
                        isSelect:false
                    },
                    "额头":{
                        image:["../image/beauty_btn_forehead_default.png","../image/beauty_btn_forehead_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setForeheadLift(this.value)
                        },
                        isSelect:false
                    },
                    "眉毛":{
                        image:["../image/beauty_btn_eyebrow_default.png","../image/beauty_btn_eyebrow_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setEyeBrow(this.value);
                        }
                    },
                    "眼角":{
                        image:["../image/beauty_btn_canth_default.png","../image/beauty_btn_canth_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setEyeCorner(this.value)
                        },
                        isSelect:false
                    },
                    "眼距":{
                        image:["../image/beauty_btn_eyespan_default.png","../image/beauty_btn_eyespan_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setEyeLength(this.value)
                        },
                        isSelect:false
                    },
                    "开眼角":{
                        image:["../image/beauty_btn_openeye_default.png","../image/beauty_btn_openeye_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setEyeAlat(this.value)
                        },
                        isSelect:false
                    },
                    "削脸":{
                        image:["../image/beauty_btn_cutface_default.png","../image/beauty_btn_cutface_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setFaceShave(this.value)
                        },
                        isSelect:false
                    },
                    "长鼻":{
                        image:["../image/beauty_btn_longnose_default.png","../image/beauty_btn_longnose_sele.png"],
                        minValue:0,
                        maxValue:100,
                        value:0,
                        onclick(e){
                        },
                        change(e){
                            console.log("--"+vm.childChildName+"-->",this.value);
                            mhsdkApi.setLengthenNoseLift(this.value)
                        },
                        isSelect:false
                    },
                    
                },
                '滤镜':{
                "原图":{
                    image:"../image/ic_filter_no.png",
                    name:"原图",
                    value:0,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "浪漫":{
                    image:"../image/ic_filter_langman.png",
                    name:"浪漫",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "清新":{
                    image:"../image/ic_filter_qingxin.png",
                    name:"清新",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "唯美":{
                    image:"../image/ic_filter_weimei.png",
                    name:"唯美",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "粉嫩":{
                    image:"../image/ic_filter_fennen.png",
                    name:"粉嫩",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "怀旧":{
                    image:"../image/ic_filter_huaijiu.png",
                    name:"怀旧",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "清凉":{
                    image:"../image/ic_filter_qingliang.png",
                    name:"清凉",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "蓝调":{
                    image:"../image/ic_filter_landiao.png",
                    name:"蓝调",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "日系":{
                    image:"../image/ic_filter_rixi.png",
                    name:"日系",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "城市":{
                    image:"../image/ic_filter_chengshi.png",
                    name:"城市",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "初恋":{
                    image:"../image/ic_filter_chulian.png",
                    name:"初恋",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "初心":{
                    image:"../image/ic_filter_chuxin.png",
                    name:"初心",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "单色":{
                    image:"../image/ic_filter_danse.png",
                    name:"单色",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "反差色":{
                    image:"../image/ic_filter_fanchase.png",
                    name:"反差色",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "琥珀":{
                    image:"../image/ic_filter_hupo.png",
                    name:"琥珀",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "美味":{
                    image:"../image/ic_filter_meiwei.png",
                    name:"美味",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "蜜桃粉":{
                    image:"../image/ic_filter_mitaofen.png",
                    name:"蜜桃粉",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "奶茶":{
                    image:"../image/ic_filter_naicha.png",
                    name:"奶茶",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "拍立得":{
                    image:"../image/ic_filter_pailide.png",
                    name:"拍立得",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "乌托邦":{
                    image:"../image/ic_filter_wutuobang.png",
                    name:"乌托邦",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "西柚":{
                    image:"../image/ic_filter_xiyou.png",
                    name:"西柚",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
                "日杂":{
                    image:"../image/ic_filter_riza.png",
                    name:"日杂",
                    value:50,
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setFilter( {'name':this.name,'value':this.value})
                    }
                },
            
            
            },
            '特效':{
                "无":{
                    image:"../image/ic_tx_no.png",
                    name:"无",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "灵魂出窍":{
                    image:"../image/ic_tx_linghun.png",
                    name:"灵魂出窍",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "抖动":{
                    image:"../image/ic_tx_doudong.png",
                    name:"抖动",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "闪白":{
                    image:"../image/ic_tx_shanbai.png",
                    name:"闪白",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "毛刺":{
                    image:"../image/ic_tx_maoci.png",
                    name:"毛刺",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "幻觉":{
                    image:"../image/ic_tx_huanjue.png",
                    name:"幻觉",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "马赛克1":{
                    image:"../image/ic_tx_msk.png",
                    name:"马赛克",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "马赛克2":{
                    image:"../image/ic_tx_msk_yuan.png",
                    name:"圆形马赛克",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "马赛克3":{
                    image:"../image/ic_tx_msk_san.png",
                    name:"三角马赛克",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
                "马赛克4":{
                    image:"../image/ic_tx_msk_liu.png",
                    name:"六边马赛克",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setSpecially(this.name)
                    }
                },
            
            },
            '水印':[
                {
                    name:"无",
                    image:"../image/ic_mh_none.png",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setWaterMark(this.name);
                    }
                },
                {
                    name:"水印1",
                    image:"../image/ic_water_thumb_0.png",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setWaterMark(this.name);
                    }
                },
                {
                    name:"水印2",
                    image:"../image/ic_water_thumb_1.png",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setWaterMark(this.name);
                    }
                },
                {
                    name:"水印3",
                    image:"../image/ic_water_thumb_2.png",
                    onclick:function(e){
                        mhsdkApi.setWaterMark(e);
                    }
                },
                {
                    name:"水印4",
                    image:"../image/ic_water_thumb_3.png",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setWaterMark(this.name);
                    }
                },
               
            ],

            '哈哈镜':{
                "无":{
                    image:"../image/ic_mh_none.png",
                    name:"无",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "外星人":{
                    image:"../image/ic_haha_waixingren.png",
                    name:"外星人",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "梨梨脸":{
                    image:"../image/ic_haha_li.png",
                    name:"梨梨脸",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "瘦瘦脸":{
                    image:"../image/ic_haha_shou.png",
                    name:"瘦瘦脸",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "镜像脸":{
                    image:"../image/ic_haha_jingxiang.png",
                    name:"镜像脸",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "片段脸":{
                    image:"../image/ic_haha_pianduan.png",
                    name:"片段脸",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "水面倒影":{
                    image:"../image/ic_haha_daoying.png",
                    name:"水面倒影",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "螺旋镜面":{
                    image:"../image/ic_haha_xuanzhuan.png",
                    name:"螺旋镜面",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "鱼眼相机":{
                    image:"../image/ic_haha_yuyan.png",
                    name:"鱼眼相机",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
                "左右镜像":{
                    image:"../image/ic_haha_zuoyou.png",
                    name:"左右镜面",
                    isSelect:false,
                    onclick:function(e){
                        mhsdkApi.setDistortion(this.name);
                    }
                },
               
            },
            '动作':{
                "原图":{
                    image:["../image/ic_texiao_action_no_0.png","../image/ic_texiao_action_no_1.png"],
                    onclick:function(e){
                    }
                },

               "抬头":{
                    image:["../image/ic_texiao_action_taitou_0.png","../image/ic_texiao_action_taitou_1.png"],
                    onclick:function(e){
                    }
                },
                "张嘴":{
                    image:["../image/ic_texiao_action_zhangzui_0.png","../image/ic_texiao_action_zhangzui_1.png"],
                    onclick:function(e){
                    }
                },
                "眨眼":{
                    image:["../image/ic_texiao_action_zhayan_0.png","../image/ic_texiao_action_zhayan_1.png"],
                    onclick:function(e){
                    }
                },
                
            },
            "基础贴纸":[{"name":"","thumb":"http:\/\/tzzip.facegl.com\/ic_cancel.png","resource":"","beauty":"","type":"0","uptime":"0","is_downloaded":"0","category":"default"},{"name":"bizi_001","thumb":"http:\/\/tzzip.facegl.com\/bizi_001.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDj:Y:E99eCY:&","type":"1","uptime":"1573538551","category":"default","is_downloaded":"0","beauty":""},{"name":"bizi_002","thumb":"http:\/\/tzzip.facegl.com\/bizi_002.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDj:Y:E99aCY:&","type":"1","uptime":"1573538591","category":"default","is_downloaded":"0","beauty":""},{"name":"cat","thumb":"http:\/\/tzzip.facegl.com\/cat.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDxsKCY:&","type":"1","uptime":"1573538653","category":"default","is_downloaded":"0","beauty":""},{"name":"erduo_001","thumb":"http:\/\/tzzip.facegl.com\/erduo_001.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDcArwtE99eCY:&","type":"1","uptime":"1573538765","category":"default","is_downloaded":"0","beauty":""},{"name":"erduo_002","thumb":"http:\/\/tzzip.facegl.com\/erduo_002.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDcArwtE99aCY:&","type":"1","uptime":"1573538820","category":"default","is_downloaded":"0","beauty":""},{"name":"erduo_003","thumb":"http:\/\/tzzip.facegl.com\/erduo_003.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDcArwtE99oCY:&","type":"1","uptime":"1573782977","category":"default","is_downloaded":"0","beauty":""},{"name":"face_001","thumb":"http:\/\/tzzip.facegl.com\/face_001.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE99eCY:&","type":"1","uptime":"1573539000","category":"default","is_downloaded":"0","beauty":""},{"name":"face_002","thumb":"http:\/\/tzzip.facegl.com\/face_002.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE99aCY:&","type":"1","uptime":"1573539065","category":"default","is_downloaded":"0","beauty":""},{"name":"face_005","thumb":"http:\/\/tzzip.facegl.com\/face_005.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE99gCY:&","type":"1","uptime":"1573539110","category":"default","is_downloaded":"0","beauty":""},{"name":"face_006","thumb":"http:\/\/tzzip.facegl.com\/face_006.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE992CY:&","type":"1","uptime":"1573539579","category":"default","is_downloaded":"0","beauty":""},{"name":"face_007","thumb":"http:\/\/tzzip.facegl.com\/face_007.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE994CY:&","type":"1","uptime":"1573539610","category":"default","is_downloaded":"0","beauty":""},{"name":"face_013","thumb":"http:\/\/tzzip.facegl.com\/face_013.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9eoCY:&","type":"1","uptime":"1573539659","category":"default","is_downloaded":"0","beauty":""},{"name":"face_019","thumb":"http:\/\/tzzip.facegl.com\/face_019.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9eZCY:&","type":"1","uptime":"1573539695","category":"default","is_downloaded":"0","beauty":""},{"name":"face_024","thumb":"http:\/\/tzzip.facegl.com\/face_024.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9aWCY:&","type":"1","uptime":"1573539727","category":"default","is_downloaded":"0","beauty":""},{"name":"face_026","thumb":"http:\/\/tzzip.facegl.com\/face_026.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9a2CY:&","type":"1","uptime":"1573539769","category":"default","is_downloaded":"0","beauty":""},{"name":"glasses_003","thumb":"http:\/\/tzzip.facegl.com\/glasses_003.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDpbshhchE99oCY:&","type":"1","uptime":"1573539813","category":"default","is_downloaded":"0","beauty":""},{"name":"head_001","thumb":"http:\/\/tzzip.facegl.com\/head_001.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE99eCY:&","type":"1","uptime":"1573539850","category":"default","is_downloaded":"0","beauty":""},{"name":"head_004","thumb":"http:\/\/tzzip.facegl.com\/head_004.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE99WCY:&","type":"1","uptime":"1573539892","category":"default","is_downloaded":"0","beauty":""},{"name":"huzi_003","thumb":"http:\/\/tzzip.facegl.com\/huzi_003.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdwY:E99oCY:&","type":"1","uptime":"1573539934","category":"default","is_downloaded":"0","beauty":""},{"name":"yanjing_001","thumb":"http:\/\/tzzip.facegl.com\/yanjing_001.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDLs8S:8pE99eCY:&","type":"1","uptime":"1573539976","category":"default","is_downloaded":"0","beauty":""},{"name":"face_046","thumb":"http:\/\/tzzip.facegl.com\/face_046.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9W2CY:&","type":"1","uptime":"1606214232","category":"default","is_downloaded":"0","beauty":""},{"name":"face_048","thumb":"http:\/\/tzzip.facegl.com\/face_048.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9WVCY:&","type":"1","uptime":"1606266126","category":"default","is_downloaded":"0","beauty":""},{"name":"face_050","thumb":"http:\/\/tzzip.facegl.com\/face_050.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9g9CY:&","type":"1","uptime":"1606266182","category":"default","is_downloaded":"0","beauty":""},{"name":"face_051","thumb":"http:\/\/tzzip.facegl.com\/face_051.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9geCY:&","type":"1","uptime":"1606290824","category":"default","is_downloaded":"0","beauty":""}],
            "高级贴纸":[{"name":"","thumb":"http:\/\/tzzip.facegl.com\/ic_cancel.png","resource":"","beauty":"","type":"0","uptime":"0","is_downloaded":"0","category":"default"},{"name":"face_003","thumb":"http:\/\/tzzip.facegl.com\/face_003.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE99oCY:&","type":"1","uptime":"1573540742","category":"default","is_downloaded":"0","beauty":""},{"name":"face_008","thumb":"http:\/\/tzzip.facegl.com\/face_008.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE99VCY:&","type":"1","uptime":"1573540834","category":"default","is_downloaded":"0","beauty":""},{"name":"face_009","thumb":"http:\/\/tzzip.facegl.com\/face_009.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE99ZCY:&","type":"1","uptime":"1573541110","category":"default","is_downloaded":"0","beauty":""},{"name":"face_010","thumb":"http:\/\/tzzip.facegl.com\/face_010.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9e9CY:&","type":"1","uptime":"1573540913","category":"default","is_downloaded":"0","beauty":""},{"name":"face_011","thumb":"http:\/\/tzzip.facegl.com\/face_011.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9eeCY:&","type":"1","uptime":"1573540997","category":"default","is_downloaded":"0","beauty":""},{"name":"face_012","thumb":"http:\/\/tzzip.facegl.com\/face_012.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9eaCY:&","type":"1","uptime":"1573541101","category":"default","is_downloaded":"0","beauty":""},{"name":"face_014","thumb":"http:\/\/tzzip.facegl.com\/face_014.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9eWCY:&","type":"1","uptime":"1573541090","category":"default","is_downloaded":"0","beauty":""},{"name":"face_015","thumb":"http:\/\/tzzip.facegl.com\/face_015.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9egCY:&","type":"1","uptime":"1573541196","category":"default","is_downloaded":"0","beauty":""},{"name":"face_016","thumb":"http:\/\/tzzip.facegl.com\/face_016.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9e2CY:&","type":"1","uptime":"1597218754","category":"default","is_downloaded":"0","beauty":""},{"name":"face_017","thumb":"http:\/\/tzzip.facegl.com\/face_017.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9e4CY:&","type":"1","uptime":"1573541314","category":"default","is_downloaded":"0","beauty":""},{"name":"face_018","thumb":"http:\/\/tzzip.facegl.com\/face_018.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9eVCY:&","type":"1","uptime":"1573541405","category":"default","is_downloaded":"0","beauty":""},{"name":"face_020","thumb":"http:\/\/tzzip.facegl.com\/face_020.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9a9CY:&","type":"1","uptime":"1573541395","category":"default","is_downloaded":"0","beauty":""},{"name":"face_021","thumb":"http:\/\/tzzip.facegl.com\/face_021.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9aeCY:&","type":"1","uptime":"1573541446","category":"default","is_downloaded":"0","beauty":""},{"name":"face_022","thumb":"http:\/\/tzzip.facegl.com\/face_022.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9aaCY:&","type":"1","uptime":"1573541526","category":"default","is_downloaded":"0","beauty":""},{"name":"face_023","thumb":"http:\/\/tzzip.facegl.com\/face_023.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9aoCY:&","type":"1","uptime":"1573541517","category":"default","is_downloaded":"0","beauty":""},{"name":"face_025","thumb":"http:\/\/tzzip.facegl.com\/face_025.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9agCY:&","type":"1","uptime":"1573541605","category":"default","is_downloaded":"0","beauty":""},{"name":"glasses_002","thumb":"http:\/\/tzzip.facegl.com\/glasses_002.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDpbshhchE99aCY:&","type":"1","uptime":"1573541612","category":"default","is_downloaded":"0","beauty":""},{"name":"head_002","thumb":"http:\/\/tzzip.facegl.com\/head_002.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE99aCY:&","type":"1","uptime":"1573541667","category":"default","is_downloaded":"0","beauty":""},{"name":"head_003","thumb":"http:\/\/tzzip.facegl.com\/head_003.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE99oCY:&","type":"1","uptime":"1573541705","category":"default","is_downloaded":"0","beauty":""},{"name":"head_005","thumb":"http:\/\/tzzip.facegl.com\/head_005.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE99gCY:&","type":"1","uptime":"1573541764","category":"default","is_downloaded":"0","beauty":""},{"name":"head_006","thumb":"http:\/\/tzzip.facegl.com\/head_006.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE992CY:&","type":"1","uptime":"1573541860","category":"default","is_downloaded":"0","beauty":""},{"name":"head_007","thumb":"http:\/\/tzzip.facegl.com\/head_007.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDdcsrE994CY:&","type":"1","uptime":"1573541901","category":"default","is_downloaded":"0","beauty":""},{"name":"miansha","thumb":"http:\/\/tzzip.facegl.com\/miansha.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDT:s8hdsCY:&","type":"1","uptime":"1573541940","category":"default","is_downloaded":"0","beauty":""},{"name":"face_038","thumb":"http:\/\/tzzip.facegl.com\/face_038.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9oVCY:&","type":"1","uptime":"1584174130","category":"default","is_downloaded":"0","beauty":""},{"name":"face_040","thumb":"http:\/\/tzzip.facegl.com\/face_040.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9W9CY:&","type":"1","uptime":"1584174130","category":"default","is_downloaded":"0","beauty":""},{"name":"face_042","thumb":"http:\/\/tzzip.facegl.com\/face_042.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9WaCY:&","type":"1","uptime":"1584174130","category":"default","is_downloaded":"0","beauty":""},{"name":"face_044","thumb":"http:\/\/tzzip.facegl.com\/face_044.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9WWCY:&","type":"1","uptime":"1584174130","category":"default","is_downloaded":"0","beauty":""},{"name":"face_045","thumb":"http:\/\/tzzip.facegl.com\/face_045.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9WgCY:&","type":"1","uptime":"1584174130","category":"default","is_downloaded":"0","beauty":""},{"name":"face_047","thumb":"http:\/\/tzzip.facegl.com\/face_047.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9W4CY:&","type":"1","uptime":"1606266063","category":"default","is_downloaded":"0","beauty":""},{"name":"face_049","thumb":"http:\/\/tzzip.facegl.com\/face_049.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9WZCY:&","type":"1","uptime":"1606266155","category":"default","is_downloaded":"0","beauty":""},{"name":"face_052","thumb":"http:\/\/tzzip.facegl.com\/face_052.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9gaCY:&","type":"1","uptime":"1625475049","category":"default","is_downloaded":"0","beauty":""},{"name":"face_054","thumb":"http:\/\/tzzip.facegl.com\/face_054.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9gWCY:&","type":"1","uptime":"1635392439","category":"default","is_downloaded":"0","beauty":""},{"name":"face_055","thumb":"http:\/\/tzzip.facegl.com\/face_055.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9ggCY:&","type":"1","uptime":"1635392461","category":"default","is_downloaded":"0","beauty":""}],
            "基础面具":[{"name":"","thumb":"http:\/\/tzzip.facegl.com\/ic_cancel.png","resource":"","type":"0","uptime":"0","is_downloaded":"0","category":"default"},{"name":"mianshi_002","thumb":"http:\/\/tzzip.facegl.com\/mianshi_002.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDT:s8hd:E99aCY:&","type":"1","uptime":"1573542016","category":"default","is_downloaded":"0"},{"name":"mianshi_003","thumb":"http:\/\/tzzip.facegl.com\/mianshi_003.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDT:s8hd:E99oCY:&","type":"1","uptime":"1573542052","category":"default","is_downloaded":"0"},{"name":"face_031","thumb":"http:\/\/tzzip.facegl.com\/face_031.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9oeCY:&","type":"1","uptime":"1574071083","category":"default","is_downloaded":"0"},{"name":"face_034","thumb":"http:\/\/tzzip.facegl.com\/face_034.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9oWCY:&","type":"1","uptime":"1574065578","category":"default","is_downloaded":"0"},{"name":"face_035","thumb":"http:\/\/tzzip.facegl.com\/face_035.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9ogCY:&","type":"1","uptime":"1574065565","category":"default","is_downloaded":"0"}],
            "高级面具":[{"name":"","thumb":"http:\/\/tzzip.facegl.com\/ic_cancel.png","resource":"","type":"0","uptime":"0","is_downloaded":"0","category":"default"},{"name":"face_027","thumb":"http:\/\/tzzip.facegl.com\/face_027.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9a4CY:&","type":"1","uptime":"1573782706","category":"default","is_downloaded":"0"},{"name":"face_028","thumb":"http:\/\/tzzip.facegl.com\/face_028.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9aVCY:&","type":"1","uptime":"1573782725","category":"default","is_downloaded":"0"},{"name":"face_029","thumb":"http:\/\/tzzip.facegl.com\/face_029.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9aZCY:&","type":"1","uptime":"1573782742","category":"default","is_downloaded":"0"},{"name":"face_030","thumb":"http:\/\/tzzip.facegl.com\/face_030.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9o9CY:&","type":"1","uptime":"1573782759","category":"default","is_downloaded":"0"},{"name":"face_033","thumb":"http:\/\/tzzip.facegl.com\/face_033.png","resource":"dKK&-DDKYY:&CMsxcpbCxtTDMsxcE9ooCY:&","type":"1","uptime":"1574071073","category":"default","is_downloaded":"0"}],
        }
        },
        mounted: function () {
            var value = api.getPrefs({
                sync: true,
                key: 'functionList'
            });
            if(value != undefined && value != ''){
                var functionListNew = JSON.parse(value)
                for(let name in functionListNew){
                    for(let childName in functionListNew[name]){
                        let value = functionListNew[name][childName].value;
                        if(value != undefined)
                        this.functionList[name][childName].value = value;{ 
                        }
                        let isSelect = functionListNew[name][childName].isSelect;

                        if(isSelect != undefined){
                            this.functionList[name][childName].isSelect = isSelect;
                            if(((name=='美颜' || name=='美型')&& childName != '原图' ) || isSelect == true){
                                console.log("isSelect-->",name,childName,this.functionList[name][childName])
                                
                                this.lastSelectChildIndex[name] = childName;
                                let change = this.functionList[name][childName].change;
                                let onclick = this.functionList[name][childName].onclick;
                                if(change != undefined){
                                    this.functionList[name][childName].change();
                                }else if(onclick != undefined){
                                    this.functionList[name][childName].onclick();
                                }
                                if(name == '基础贴纸'||name == '高级贴纸'||name == '基础面具'||name == '高级面具'){
                                    this.childName = name;
                                    console.log("恢复贴纸-->",name,childName,this.functionList[name][childName])
                                    this.selectTieZhi(this.functionList[name][childName]);
                                }
                            }
                        }

                    }
                }
            }

            console.log("mounted-->",value);

            // console.log('a is: ',api.safeArea.top)
            //  this.$refs.content.style.marginBottom = api.safeArea.top + 'px';
        //  this.fixBar();
            
        },
        destroyed:function(){
            this.saveValue();
        },
        methods:{
            saveValue(){
                    api.setPrefs({
                    key: 'functionList',
                    value: JSON.stringify(this.functionList)
                });
                console.log("destory-->",JSON.stringify(this.functionList))
            },
            change(e){
                this.functionList[this.childName][this.childChildName[this.childName]].change(e)
            },
            selectTieZhi(e){
                e.is_downloaded = 1;
				e.key = this.childName;
                console.log("设置贴纸-->",e)

                mhsdkApi.setSticker(e);
            },
            selectChild(index){
                console.log(index,this.lastSelectIndex,this.itemChild[this.lastSelectIndex[this.name]]);
                // if(this.lastSelectIndex!=undefined){
                    this.$set(this.functionList[this.itemChild[this.lastSelectIndex[this.name]].name],'isSelect',false);
                // }
                // if(this.itemChildChild.length>0){
                //     this.$set(this.itemChildChild[this.lastSelectChildIndex],'isSelect',false);
                // }
                
                this.itemChildChild = this.itemChild[index].list;
                this.childName = this.itemChild[index].name;
                this.lastSelectIndex[this.name] = index;
                this.$set(this.functionList[this.itemChild[index].name],'isSelect',true);

                // this.lastSelectChildIndex = undefined;
            },
            selectChildChild(index){
                if(this.childName == '水印'||this.childName == '基础贴纸'||this.childName == '高级贴纸'||this.childName == '基础面具'||this.childName == '高级面具'){
                    if(this.lastSelectChildIndex[this.childName] != undefined){
                     this.$set(this.functionList[this.childName][this.lastSelectChildIndex[this.childName]],'isSelect',false);
                    }
                    var cacheName = '基础贴纸';
                    if(this.childName != cacheName && this.lastSelectChildIndex[cacheName] != undefined ){
                        this.$set(this.functionList[cacheName][this.lastSelectChildIndex[cacheName]],'isSelect',false);
                    }
                    cacheName = '高级贴纸';
                    if(this.childName != cacheName && this.lastSelectChildIndex[cacheName] != undefined ){
                        this.$set(this.functionList[cacheName][this.lastSelectChildIndex[cacheName]],'isSelect',false);
                    }
                    cacheName = '基础面具';
                    if(this.childName != cacheName && this.lastSelectChildIndex[cacheName] != undefined ){
                        this.$set(this.functionList[cacheName][this.lastSelectChildIndex[cacheName]],'isSelect',false);
                    }
                    cacheName = '高级面具';
                    if(this.childName != cacheName && this.lastSelectChildIndex[cacheName] != undefined ){
                        this.$set(this.functionList[cacheName][this.lastSelectChildIndex[cacheName]],'isSelect',false);
                    }
                    this.lastSelectChildIndex[this.childName] = index;
                    this.$set(this.functionList[this.childName][index],'isSelect',true);

                    return
                }
                if(this.lastSelectChildIndex[this.childName] != undefined){
                     this.$set(this.functionList[this.childName][this.lastSelectChildIndex[this.childName]],'isSelect',false);
                }
                let selectChildChildName = this.itemChildChild[index].name;
                this.childChildName[this.childName] = selectChildChildName;

                this.lastSelectChildIndex[this.childName] = selectChildChildName;
                this.$set(this.functionList[this.childName][selectChildChildName],'isSelect',true);

            },
            select:function(index){
                
                        console.log("---items-01->",index)

                        //默认选择第一个
                        this.itemChild = this.items[index].list;
                        //设置子界面
                        this.name = this.items[index].name;
                        
                        if(this.lastSelectIndex[this.name] == undefined){
                            this.childName = this.itemChild[0].name;
                            this.lastSelectIndex[this.name] = 0;
                            this.$set(this.functionList[this.childName],'isSelect',true);
                            this.itemChildChild = this.itemChild[0].list;
                        }else{
                            this.childName = this.itemChild[this.lastSelectIndex[this.name]].name;
                            this.itemChildChild = this.itemChild[this.lastSelectIndex[this.name]].list;

                        }
                    
                    },
            fixBar(){
            // `this` 指向 vm 实例
           
            },
            bringToFront(){
			api.bringFrameToFront({
				from:api.frameName,
				//to:'frm_2'
			});
		},
		
		sendToBack(){
            vm.saveValue();
            if(this.name != undefined){
                this.name = undefined;
                this.childName = undefined;
                // this.childChildName = undefined;
                return
            }
			api.sendFrameToBack({
			    from: api.frameName,
			    //to: 'frm_2'
			});
           

		},
        }

    })

//1.美颜放到后层
//2.打开站位层
//3.处理事件
</script>

</html>
